package com.csu.csumall.VO;

import com.csu.csumall.entity.Cart;
import com.csu.csumall.entity.Product;
import lombok.Data;

import java.math.BigDecimal;


@Data
public class CartVO {
    private Integer id;
    private Integer productId;
    private String mainImage;
    private String productName;
    private Integer price;
    private Integer quantity;
    private Integer checked;
    private Integer status;

    public CartVO(Cart cart, Product product) {
        this.id = cart.getId();
        this.productId = product.getId();
        this.productName = product.getName();
        this.mainImage = product.getMainImage();
        this.price = product.getPrice();
        this.quantity = cart.getQuantity();
        this.checked = cart.getChecked();
        this.status = cart.getStatus();
    }
}
